package com.letfox.user.service.relation.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.letfox.user.dao.relation.RoleAuthorityDao;
import com.letfox.user.model.relation.URoleAuthority;
import com.letfox.user.service.relation.RoleAuthorityService;

@Service
public class RoleAuthorityServiceImpl implements RoleAuthorityService{

	@Autowired
	private RoleAuthorityDao roleAuthorityDao;
	
	@Override
	public int save(URoleAuthority entity) {
		return roleAuthorityDao.insert(entity);
	}

	@Override
	public int update(URoleAuthority entity) {
		return roleAuthorityDao.update(entity);
	}

	@Override
	public int deleteById(Long id) {
		return roleAuthorityDao.deleteById(id);
	}

	@Override
	public int deleteByIds(String ids) {
		return roleAuthorityDao.deleteByIds(ids);
	}

	@Override
	public URoleAuthority getById(Long id) {
		return roleAuthorityDao.selectById(id);
	}

	@Override
	public List<URoleAuthority> getList(URoleAuthority entity) {
		return roleAuthorityDao.selectList(entity);
	}

	@Override
	public List<URoleAuthority> getList(Map<String, Object> params) {
		return roleAuthorityDao.selectList(params);
	}

}
